package com.smitish.vueblog.service.impl;

import com.smitish.vueblog.common.dto.ModifyUserInfoDto;
import com.smitish.vueblog.entity.User;
import com.smitish.vueblog.mapper.UserMapper;
import com.smitish.vueblog.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Smitish
 * @since 2020-11-30
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


    /**
     * 自定义修改用户信息的Service的实现类
     *
     * @param modifyUserInfoDto 修改信息的实体类
     * @param uid               用户id
     * @return 返回Dao层的结果
     */
    @Override
    public boolean updateUserInfo(ModifyUserInfoDto modifyUserInfoDto, Long uid) {
        boolean b = this.baseMapper.updateUserInfo(modifyUserInfoDto.getEmail(), modifyUserInfoDto.getDescription(), uid);
        return b;
    }
}
